package com.yueke.gemini.common;

/**
 * Created by admin on 2019/11/15.
 */
public interface IReferenceQuery {

    /**
     * 模块编码
     * @return
     */
    public String getModuleCode();

    /**
     * 模块标签
     * @return
     */
    public String getLabel();


    /**
     * 引用大类模块
     */
    public enum RefModule implements IReferenceQuery{

        REF_MOD_001("SIGN","签到","N"),
        REF_MOD_002("Resive","领积分","N"),

        ;

        /**
         * 模块编码
         */
        private String moduleCode;

        /**
         * 模块标签
         */
        private String label;

        /**
         * 是否仅在结果上显示
         */
        private String onlyResultRef;

        /**
         * 构造方法
         * @param moduleCode
         * @param label
         * @param onlyResultRef
         */
        RefModule(String moduleCode, String label, String onlyResultRef) {
            this.moduleCode = moduleCode;
            this.label = label;
            this.onlyResultRef = onlyResultRef;
        }

        @Override
        public String getModuleCode() {
            return moduleCode;
        }

        @Override
        public String getLabel() {
            return label;
        }

        public String getOnlyResultRef() {
            return onlyResultRef;
        }
    }

    public enum RefCom{
        SHOW_UMMUST("展示非必填"),
        SHOW_MUST("展示且必填"),
        NONE("不展示"),
        ;

        /**
         * 名称
         */
        private String label;

        RefCom(String label) {
            this.label = label;
        }

        public String getLabel() {
            return label;
        }
    }

    /**
     * 子模块
     */
    public enum SubRefModule implements IReferenceQuery{


        REF_SUB_MODULE_001(RefModule.REF_MOD_001.getModuleCode(),"YK_SIFN","签到业务"),


        ;

        /**
         * 父模块
         */
        private String parentModuleCode;

        /**
         * 模块
         */
        private String moduleCode;

        private String label;

        SubRefModule(String parentModuleCode, String moduleCode, String label) {
            this.parentModuleCode = parentModuleCode;
            this.moduleCode = moduleCode;
            this.label = label;
        }

        public String getParentModuleCode() {
            return parentModuleCode;
        }

        @Override
        public String getModuleCode() {
            return moduleCode;
        }

        @Override
        public String getLabel() {
            return label;
        }
    }
}
